// 引入http请求
import request from '../utils/request'

// 获取验证码
export const getCode = (data) => {
    return request.post('/get/code', data)
}

// 注册用户
export const userAuthentication = (data) => {
    return request.post('/user/authentication', data)
}

// 登录
export const login = (data) => {
    return request.post('/login', data)
}

// 菜单权限数据
export const userGetMenu = () => {
    return request.get('/user/getmenu')
}

// 菜单权限修改
export const userSetMenu = (data) => {
    return request.post('/user/setmenu', data)
}

// 菜单权限列表
export const menuList = (params) => {
    return request.get('/menu/list', { params })
}

// 账号管理列表 { params: params }
// 发起一个 GET 请求，并且将 params 对象中的数据作为查询参数附加在 URL 上
export const authAdmin = (params) => {
    return request.get('/auth/admin', { params })
}

// 权限下拉列表
export const menuSelectList = () => {
    return request.get('/menu/selectlist')
}

// 用户信息修改
export const updateUser = (data) => {
    return request.post('/update/user', data)
}


// 用户菜单权限
export const menuPermissions = () => {
    return request.get('/menu/permissions')
}

// 陪护师头像
export const photoList = () => {
    return request.get('/photo/list')
}

// 陪护师创建
export const companionCreate = (data) => {
    return request.post('/companion', data)
}

// 陪护师列表
export const companionList = (params) => {
    return request.get('/companion/list', { params })
}

// 陪护师删除
export const deleteCompanion = (data) => {
    return request.post('/delete/companion', data)
}

// 订单列表
export const adminOrdert = (params) => {
    return request.get('/admin/order', { params })
}

// 设置订单服务状态完成
export const updateOrder = (data) => {
    return request.post('/update/order', data)
}

// 报表
export const report = () => {
    return request.get('/report')
}